<include file="Public/head"/>
<link href="__PUBLIC__/qwadmin/css/shen/shen.css" rel="stylesheet" type="text/css" />

<body class="no-skin">
<style>
/*body .demo-class .layui-layer-title{background:#6495ED; color:#fff; border: none;}
body .demo-class .layui-layer-btn{border-top:1px solid #E9E7E7}
body .demo-class .layui-layer-btn a{background:#333;}
body .demo-class .layui-layer-btn .layui-layer-btn1{background:#999;}*/

/*body th{
    color:#4F94CD;
    font-size:15px;
}
body td{
    font-size:14px;
}*/
.ddd tr{border: none;}
.d11{display: flex;flex-direction: row;justify-content: center;align-items: flex-start;margin-top: 20px; margin-bottom: 20px;}
.ppu1{width: 10%;height: 80%;border: none;}
.ppu{border: none;width: 100%;height: 80%;text-align: center;}
.ddd td{height: 40px;border-bottom: 0px;border-right: 0px;}
.ddd th{height: 40px;border-bottom: 0px;border-right: 0px;}






#tet th{
    text-align: center;
}
#tet td{
    text-align: center;
}

#divv input{
    margin:0px 5px;
}
.dds input{
    margin:0px 5px;
}


.sp {
    border:1px solid #ccc;
    border-radius:50px;
    /*margin-top:30px;*/
}
.sp ul{
    margin-top:20px;
}
.sp ul li{
     float:left;
    margin:3px 10px;
    font-size:15px; 
    margin-left:28px;
}

.sp ul li button{
    width:140px;
    height:40px;
    border:1px solid #ccc;
    border-radius:50px;
}

#xxx ul{
    float:left;
    margin-top:5%;
}

#xxx ul li{
    float:left;
    padding: 5px 15px;
    margin-left:8px;
    font-size:15px;

}
.table th{
    font-size:18px;
    color:#000;
}

</style>
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
           
                    <!-- 行政物资审核 -->
                   <div class="row" style="margin-top:-60px">
                        <div class="widget-box" style="margin-top:70px;height:0px;">
                            <div class="widget-header">
                                <h4 class="widget-title" style="color:#1E90FF;">
                                    <label>                 
                                        <span class="lbl"></span>
                                    </label>
                                    <b style="color:#00EC00">--{$title}--</b>
                                </h4>
                                <div class="widget-toolbar">
                                    <notempty name="v.children">
                                        <a href="#" data-action="collapse">
                                            <i class="ace-icon fa fa-chevron-up"></i>
                                        </a>
                                    </notempty>
                                </div>
                            </div>
                            <notempty name="v.children">
                                <div class="widget-body">
                                    
                                    <div class="widget-main row" style="height:100%;margin-top:2px;">
                                        <?php if(!empty($list)): ?>
                                                <!-- 行政物资审核 END -->
                                                <div>
                                                <!-- <h4 style="text-align:center;"><b>行政物资申请:</b></h4> -->
                                                <!-- <form id="form" method="post" action="{:U('Shenp/ytong')}"> -->
                                                <table class="table table-bordered" style="margin-top:5px;">
                                                    <thead>
                                                        <tr>
                                                            
                                                            <th class="center">编号</th>
                                                            <!-- <th class="center">物品类别</th> -->
                                                            <!-- <th class="center">申请类型</th> -->
                                                            <th class="center">摘要</th>
                                    
                                                            <th class="center">金额</th>
                                                            <th class="center">科目</th>
                                                            <!-- <th class="center">剩余库存</th> -->
                                                            <th class="center">单据张数</th>

                                                            <th class="center">备注</th>
                                                            <th class="center">申请人</th>
                                                            <th class="center">所属部门</th>
                                                            <th class="center">申请时间</th>
                                                            <th class="center">详细信息</th>
                                                            <th class="center">查看凭证</th>
                                                            <!-- <th class="center">备注</th> -->
                                                            <th class="center">状态</th>
                                                            <?php if(!empty($lei)): ?>
                                                            <th class="center">确认领用</th>
                                                            <?php endif ?>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                    <volist name="list" id="v">
                                                        <tr>
                                                            
                                                            <td class="center" id="ddi">{$v.id}</td>                                                   
                                                                                                 
                                                            <td class="center">{$v.zai}</td>                                                   
                                                            <td class="center" style="font-size:17px;"><b style="color:red;">{$v.unit} /元</b></td>
                                                            <td class="center">
                                                                
                                                                    {$v.ke}
                                                                
                                                            </td>
                                                            
                                                            <td class="center">{$v.dan}</td>
                                                            <td class="center">{$v.content}</td>
                                                            <td class="center">{$v.uname}</td>
                                                            <td class="center">{$v.ment}</td>
                                                            <td class="center">{$v.time}</td>
                                                            <td class="center"><a href="{:U('xiang',array('id'=>$v['id']))}" class="tong" style="width:100px;border:1px solid #FFA500;box-shadow: 3px 3px 10px #FFA500;color:#FFA500" >查看详细信息</a></td>
                                                            <?php if(!empty($v['img'])): ?>
                                                            <td class="center">
                                                                <a href="{:U('ping',array('id'=>$v['id']))}">下载</a>
                                                            </td>
                                                            <?php else: ?>
                                                                <td class="center">没有凭证</td>
                                                            <?php endif ?>
                                                            <!-- <td><img src="__PUBLIC__{$v.img}" alt=""></td> -->
                                                           <!--  <td  onclick="xc(this)" id="layer-photos-demo" class="layer-photos-demo">
                                                            <img  layer-src="__PUBLIC__{$v.img}"  alt="查看凭证">
                                                            </td> -->
                                                            <!-- <td class="center">{$v.content}</td> -->
                                                            
                                                          
                                                            <td class="center" style="">
                                                                <b style="color:#28FF28">√ 审批已通过</b>
                                                            </td>
                                                            <?php if(!empty($lei)): ?>
                                                                <td class="center"><div class="tong" style="width:80px;border:1px solid #2894FF;box-shadow: 3px 3px 10px #2894FF;color:#2894FF" onclick="qqq({$v.id},this)">确认领用</div></td>
                                                            <?php endif ?>
                                                            
                                                          
                                                            
                                                        </tr>
                                                    </volist>
                                                    </tbody>
                                                </table>
                                                 <!-- </form> -->
                                                <!-- 行政物资审核 END -->
                                                   {$page}
                                        <?php endif ?>
                                                </div>
                                      

                                    
                                    </div>
                                </div>
                            </notempty>
                        </div>
                    </div>
                                  
            

                                      
            <div style="width:50%;display:none; text-align:center;position:absolute;left:30%;" id="tu">
           
            <img src="" alt="" id="img" style="box-shadow: 10px 10px 5px #888888;width:70%;">
                 <div style="width:50px;height:50px;background-color:#ccc;text-align:center;line-height:50px;float:right;margin-right:20%;box-shadow: 10px 10px 5px #888888;color:#fff;z-index:999;cursor: pointer;" onclick="xx()"><b>关闭</b></div>
            </img>
        
          </div>
         
                    
                     


                


            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <!-- <include file="Public/footer"/> -->

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/layer/layer.js"></script>
<script src="__PUBLIC__/jquery-1.7.2.min.js"></script>
<script>

function xc(id,obj)
{
    // console.log(id);
     $.ajax({
        url:"{:U('Rmb/ping')}",
        type: 'post',
        data:{'id':id},
        dataType:'json',
        beforeSend:function(){
                    layer.load(0, {shade: false});
                },
        success:function(msg){
            
            var img = '__PUBLIC__'+msg;
            // console.log(img);
            $("#img").attr('src',img); 
            $('#tu').show();
        },
        complete: function() {
                     layer.closeAll('loading');
                }
    })
}

function xx()
{
    $('#tu').hide();
}


function qqq(id,obj)
{
    //询问框
    layer.confirm('确认员工是否领用? ', {
      btn: ['确定','取消'] //按钮
    }, function(){
         $.ajax({
                url:"{:U('Rmb/que')}",
                type: 'post',
                data:{'id':id},
                dataType:'json',
                beforeSend:function(){
                    layer.load(0, {shade: false});
                },
                success:function(msg){
                    if (msg == 1111) {
                        layer.msg('确定成功!', {icon: 1});
                        // $(obj).parent().html('[审核通过!!]').css({'color':' #7FFF00','font-width':'900'});
                        history.go(0); 
                    }else{
                        layer.msg('确定失败!', {icon: 2});
                    }
                },
                complete: function() {
                     layer.closeAll('loading');
                }
            })
     
    }, function(){
        layer.msg(' (｡・`ω´･) 再见');
    });
}
</script>


</body>

</html>
                